package 反转字符串;

/**
 * @author zhengTao
 * @version 1.0
 * @description: 反转字符串
 * @date 2022/10/17 12:21
 */
public class Demo344 {
    public void reverseString(char[] s) {
        int left=0;
        int right=s.length-1;
        while (left<right){
            char temp=s[left];
            s[left]=s[right];
            s[right]=temp;
            left++;
            right--;
        }
    }
}
